import java.util.ArrayList;


public class Job
{
	private int release;
	private int time;	//Computation time
	private int initTime;
	private int response;
	private int start;
	private ArrayList<Integer> startCompTimes;	//keep track of when the scheduler starts executing the job
	private ArrayList<Integer> finishCompTimes; //keep track of when the scheduler preempts or finishes executing job
	private Task owner;
	
	public Job()
	{
		start = -1;
		startCompTimes = new ArrayList<Integer>();
		finishCompTimes = new ArrayList<Integer>();
	}
	
	public String toString()
	{
		return "time " + getTime() + " response " + getResponse() + " initTime " + getInitTime();
	}
	
	public int getRelease() 
	{
		return release;
	}
	public void setRelease(int release) 
	{
		this.release = release;
	}
	public int getTime() 
	{
		return time;
	}
	public void setTime(int time) 
	{
		this.time = time;
	}
	public int getResponse() 
	{
		return response;
	}
	public void setResponse(int response) 
	{
		this.response = response;
	}
	public int getStart() 
	{
		return start;
	}
	public void setStart(int start) 
	{
		this.start = start;
	}
	public Task getOwner() 
	{
		return owner;
	}
	public void setOwner(Task owner) 
	{
		this.owner = owner;
	}

	public int getInitTime() 
	{
		return initTime;
	}

	public void setInitTime(int initTime) 
	{
		this.initTime = initTime;
	}

	public void addStartCompTime(int startCompTime) {
		this.startCompTimes.add(startCompTime);
	}

	public ArrayList<Integer> getStartCompTimes() {
		return startCompTimes;
	}
	
	public void addFinishCompTime(int finishCompTime) {
		this.finishCompTimes.add(finishCompTime);
	}

	public ArrayList<Integer> getFinishCompTimes() {
		return finishCompTimes;
	}
}
